package szkeleton;

import szkeleton.Element.Type;

//Atka tesztx
public class Key extends Element{
	public Key(){
		if (Controller.isDebug())
		System.out.println("Key konstruktor");
		isTaken = false;
		type = Type.k;
		Gamelogic.pushKey(this);
	}
	
	private boolean isTaken;
	
	
	public boolean isTaken(){
		return isTaken;
	}
	
	public void taken(){
		System.out.println("KeyTaken() for debug only!!");
		isTaken = true;
	}
	
	public void collide(Player player){
		isTaken = true;
		Gamelogic.popKey(this);
		
		player.whiteCollided();
	}

	@Override
	public boolean isCompatible(Element e) {
		if(e.getTipe() == Type.bp) return false;
		else return true;
	}

}